import request from "@/utils/request";
// 登录
export function login(obj) {
  return request({
    url: "login",
    method: "post",
    data: obj,
  });
}
// qq登录
export function qqLogin(unionId, source = 6) {
  return request({
    url: "login/social",
    method: "post",
    data: { unionId, source },
  });
}

// 第三方登录获取手机验证码
export function sendMsg(obj) {
  return request({
    url: "login/social/code",
    method: "get",
    params: obj,
  });
}

// 绑定手机号
export function bindMobile(obj) {
  return request({
    url: "login/social/bind",
    method: "post",
    data: obj,
  });
}
// 完善信息
export function perfect(obj) {
  return request({
    url: `login/social/${obj.unionId}/complement`,
    method: "post",
    data: obj,
  });
}
